package com.service.Impl;

import com.mapper.PostMapper;
import com.pojo.Post;
import com.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PostServiceImpl implements PostService {
    @Autowired
    private PostMapper postMapper;
    /**
     * 添加部门
     */
    public int addPost(Post post){
        return postMapper.addPost(post);
    }
    /**
     *  查询所有部门
     */
    public List<Post> selectAllPost(){
        return postMapper.selectAllPost();
    }

    /**
     * 根据条件查询
     */
    public  List<Post> selectPostByCondition(Post post){
        return  postMapper.selectPostByCondition(post);
    }
    /**
     * 修改信息
     */
    public int updatePost(Post post){
        return  postMapper.updatePost(post);
    }
    /**
     * 删除信息
     */
    public  int deletePost(String postName){
        return  postMapper.deletePost(postName);
    }
}
